*** Settings ***
Documentation    租号玩app接口自动化测试用例
Library          database_lib.testdb.TestDataBaseLibrary
Library          comm_lib.CommLibrary
Library          init_lib.InitDataLibrary
Library          verify_lib.VerifyLibrary
Resource         suites/resource.robot
Test Teardown  save case info  ${SUITE NAME}

*** Keywords ***
LoginKw
    ${user} =  get user info
    ${sign} =  get sign  ${user[0]}  ${user[1]}
    update test data req json by name  login  username=${user[0]}  password=${user[1]}  sign=${sign}
    When login
    log response info
    ${token} =  parse resp json  data.token
    Then common verify
    [Return]  ${token}

GetTokenKw
    [Arguments]  ${env}
    ${token} =  run keyword if  '${env}' == 'test'
    ...     LoginKw
    ...     ELSE
    ...     get token by env
    [Return]  ${token}

*** Test Cases ***
zhwApp_001
    [Tags]  ios号主助手重构-首页
    [Documentation]  首页
    When haoHelperIndex
    log response info
    verify response status

zhwApp_002
    [Tags]  ios号主助手重构-我的
    [Documentation]  生意管理首页
    When businessManage
    log response info
    verify response status
